<script setup>
import { ref } from "vue"
const arrayNum = ref([]);
const clickMe = () => {
    let arrRand = [];
        const arrLen = 10
        for (let index = 0; index < arrLen; index++) {
            arrRand.push(Math.floor(Math.random() * 101));
        }
        arrayNum.value = arrRand;
}
</script>
<template>
    <button @click="clickMe">开始</button>
    <div v-for="(item, index) in arrayNum" class="num">
        {{ item }}
    </div>
</template>
<style>
.num {
    width: 20px;
    height: 20px;
    background-color: red;
    margin-bottom: 5px;
}
</style>